<?php

function __autoload($class_name) {
    include_once 'classes/' . $class_name . '.class.php';
}
session_name('czego_tu_szukasz');
        session_start();
$cfg = new Config;
if (!empty($_GET)) {

    $get_v = array_values($_GET);
    $get_k = array_keys($_GET);
      
    $obj = new $get_k[0](new Db, $cfg);
    
    $obj->$get_v[0]();
}else{
    header('Location: ' . $cfg->get('site_url').$cfg->get('index_page'));
}

?>
